﻿using UnityEngine;
using System.Collections;

public class Blaster : MonoBehaviour {
	public float speed;
	public bool playerBlaster;
	public float direction; // 1 for right, -1 for left
	// Use this for initialization
	void Start () {
		setDirection (direction);
	}
	
	// Update is called once per frame
	void Update () {

	}

	public void setPlayerBlaster(bool playerBlaster) {
		this.playerBlaster = playerBlaster;
	}

	public void setDirection(float direction) {
		this.direction = direction;
		rigidbody2D.velocity = new Vector2 (speed * direction, 0f);
	}

	public void pushToPool() {
		// Make this push to object pool someday
		// Destroy (gameObject);
	}
}
